//
//  ThirdViewController.m
//  INAlienLand
//
//  Created by wYz on 15/7/10.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "ThirdViewController.h"

@interface ThirdViewController ()


@end

@implementation ThirdViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor grayColor];
    
    UIWebView* webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height-49-64)];
    
    [self.view addSubview:webView];
    NSString *str = self.Url;
    NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:str]];
    
    
    [webView setBackgroundColor:[UIColor colorWithRed:0.987 green:1.000 blue:0.806 alpha:1.000]];
    [webView loadRequest:request];
    
    [webView goBack];
    [webView goForward];
    [webView reload];

    
    //添加一个清扫的手势
    UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeGest:)];
    [webView addGestureRecognizer:swipe];
    //向右
    swipe.direction = UISwipeGestureRecognizerDirectionRight;
    

}

- (void)swipeGest:(UISwipeGestureRecognizer *)swipe{
    
    [self.navigationController popToRootViewControllerAnimated:YES];
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
